package com.atguigu.jxc.controller;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.DamageList;
import com.atguigu.jxc.service.DamageListGoodsService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/damageListGoods")
public class DamageListGoodsController {
    @Resource
    private DamageListGoodsService damageListGoodsService;


    //保存
    @PostMapping("/save")
    public ServiceVO saveDamageListGoods(DamageList damageList, String damageListGoodsStr){
        return damageListGoodsService.saveDamageListGoods(damageList, damageListGoodsStr);

    }
    //展示
    @PostMapping("/list")
    public Map<String, Object> getDamageListGoods(String  sTime, String eTime){

        return damageListGoodsService.getDamageListGoods(sTime, eTime);
    }
    //商品展示
    @PostMapping("/goodsList")
    public Map<String, Object> getGoodsList(Integer damageListId){
        return damageListGoodsService.getGoodsList(damageListId);
    }

}
